<template>
    <div>
        <!-- 商品分类导航 -->
        <TypeNav></TypeNav>
        <!--列表-->
        <ListContainer></ListContainer>
        <!--今日推荐-->
        <Recommend></Recommend>
        <!-- 商品排行 -->
        <Rank></Rank>
        <!-- 猜你喜欢 -->
        <Like></Like>
        <!-- 楼层 -->
        <Floor :key="floor.id" v-for="floor in floorList" :floor="floor" :cname="'floor-swiper' + floor.id"></Floor>
        <!-- 底部 -->
        <Brand></Brand>
    </div>
</template>

<script>
// 导入组件
// import TypeNav from './TypeNav'; // typenav已经是全局组件
import ListContainer from './ListContainer'
import Recommend from './Recommend'
import Rank from './Rank'
import Like from './Like'
import Floor from './Floor'
import Brand from './Brand'
import { mapActions, mapState } from 'vuex'

export default {
    name: "Home",
    mounted() {
        this.getFloorListData();
    },
    methods: {
        ...mapActions('home', ['getFloorListData'])
    },
    computed: {
        ...mapState('home', ['floorList'])
    },
    components: {
        // TypeNav,
        ListContainer,
        Recommend,
        Rank,
        Like,
        Floor,
        Brand
    }
}
</script>

<style lang="less" scoped>

</style>